/*******************************************************************************
  * @file                   mqos_task.h
  * @Author:                MQjehovah                 mail:MQjehovah@hotmail.com
  * @version                1.0.0
  * @date                   2017.7.25
  * @brief                  
  ******************************************************************************
  * @attention
*******************************************************************************/
#ifndef _MQOS_TASK_H
#define _MQOS_TASK_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_conf.h"

/* Definition ----------------------------------------------------------------*/
#define MQOS_LOWEST_PRIO		32u

typedef enum
{
	MQOS_STATUS_SLEEP,
	MQOS_STATUS_READY,
	MQOS_STATUS_SUSPEND,
	MQOS_STATUS_RUNNING,
	MQOS_STATUS_ISR
	
}MQOS_TASK_STA;

typedef u32	  	MQOS_STK;				/* Each stack entry is 32-bit wide*/

typedef struct mqos_tcb {
    OS_STK          *OSTCBStkPtr;           /* Pointer to current top of stack                         */
	
	
    struct os_tcb   *OSTCBNext;             /* Pointer to next     TCB in the TCB list                 */
    struct os_tcb   *OSTCBPrev;             /* Pointer to previous TCB in the TCB list                 */

    INT32U           OSTCBDly;              /* Nbr ticks to delay task or, timeout waiting for event   */
    INT8U            OSTCBStat;             /* Task      status                                        */
    INT8U            OSTCBStatPend;         /* Task PEND status                                        */
    INT8U            OSTCBPrio;             /* Task priority (0 == highest)                            */
	
#if MQOS_TASK_NAME_EN > 0u
    INT8U           *OSTCBTaskName;
#endif

} MQOS_TCB;




u32 MQOS_RdyTbl;
/* Exported Functions --------------------------------------------------------*/
void USART_GPIO_Config(USART_TypeDef *USARTx);

/*********************************END OF FILE**********************************/
#endif
